﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Purchases.aspx.cs" Inherits="TicketingCompany.Purchases" %>
<asp:Content ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <asp:Repeater ID="RepeaterEvents" runat="server">  <%--DataSourceID="EntityDataSourceEvents"--%>
        <ItemTemplate>
            <asp:Panel runat="server" BackColor="LightBlue">
                <h1>Title: <%# SafeEval("Title") %></h1>
                <div>Category: <%# GetCategoryByID() %></div>
                <div>Location: <%# GetLocationByID() %></div>
                <div>Price: <%# Eval("Price") %></div>
                <div>Date and Time: <%# Eval("DateTime") %></div>
                <asp:Button Text="Purchase" runat="server" OnCommand="ButtonPurchase_OnCommand" CommandArgument='<%# Eval("EventID") %>' />
            </asp:Panel>
        </ItemTemplate>
        <SeparatorTemplate>
            <hr />
        </SeparatorTemplate>
    </asp:Repeater>
    <%--<asp:EntityDataSource ID="EntityDataSourceEvents" runat="server" 
        ConnectionString="name=TicketingCompanyEntities" 
        DefaultContainerName="TicketingCompanyEntities" EnableFlattening="False"
        EntitySetName="Events">      
    </asp:EntityDataSource>--%>
    
</asp:Content>
